<?php
class ControllerTestTest extends Controller {
    
    public  function wxtest(){
        
        $this->response->setDataResult(0,"111uid",null);
        return;
    }
    public function resethx()
    {
        $this->load->model('test/test');
        
        if (isset($this->request->get['start'])) {
            $start = $this->request->get['start'];
        } else {
            $start = 1;
        }
        
        if (isset($this->request->get['count'])) {
            $count = $this->request->get['count'];
        } else {
            $count = 1;
        }
        
        $results = $this->model_test_test->getCustomers($start, $count);
        $this->load->model('tool/easemob');
        foreach ($results as $result) {
            $this->model_tool_easemob->setPassword('cook'.$result['customer_id'],md5($result['password']));
        }
    }
    
    
    public function paid()
    {
        $this->load->model('tool/mqs');
        $this->model_tool_mqs->sendOrderPaidMessage(299);
    }
    
    public function receive()
    {
        $this->load->model('tool/mqs');
        $msg = $this->model_tool_mqs->receiveOrderPaidMessage();
        if($msg)
        {
            
            echo json_encode($msg);
            //$this->model_tool_mqs->deleteOrderPaidMessage($msg);
        }
    }
    
    public function ios()
    {
        $umeng = new UMeng("5513d056fd98c55f23000d3d","8k2y7ro5rqijvynhd96fvh3fjjrci1ph");
        
        
        //3918fbb055977acfc98a4b40b822e81115dbdca0339589c7570657baac69e191
        $umeng->sendIOSUnicast();
    }   
}